package com.andy.qi.util;

import java.util.List;

public class ListUtils {

    public static <T> T pop(List<T> list) {
        return list.remove(list.size() - 1);
    }
    
    public static <T> void splice(List<T> list, int startIndex, int removeNum) {
        for(int i = startIndex + removeNum - 1; i >= startIndex; i--) {
            list.remove(i);
        }
    }
    
    public static <T> void shift(List<T> data) {
        data.remove(0);
    }

}
